{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "cdf4b7f3",
   "metadata": {},
   "outputs": [],
   "source": [
    "from PIL import Image"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "d4e21028",
   "metadata": {},
   "outputs": [],
   "source": [
    "img = Image.open(fp=\"2007_000480.png\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "b98e643e",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "76c608bb",
   "metadata": {},
   "outputs": [],
   "source": [
    "img1 = np.array(img)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "a309cbb4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{0, 1, 2, 3, 4, 255}"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "set(img1.reshape(-1).tolist())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "525e8e38",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
